package org.jeecg.modules.score.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.score.entity.AstuStudentScore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 个人分数
 * @Author: jeecg-boot
 * @Date:   2021-09-25
 * @Version: V1.0
 */
public interface AstuStudentScoreMapper extends BaseMapper<AstuStudentScore> {
    /**
     * 修改学生成绩 通过学号和实验id
     * @param stuNumber
     * @param experimentId
     * @param score
     */
    @Update("update astu_student_score set experiment_score=#{score} where stu_number=#{stuNumber} and experiment_id=#{experimentId}")
    void updateScoreByStuNumberAndExperimentId(@Param("stuNumber") String stuNumber,@Param("experimentId") String experimentId,@Param("score") String score);
    /**
     * 根据学生学号和课程id  查询学生分数信息
     * @param stuNumber
     * @param courseId
     * @return
     */
    @Select("select * from astu_student_score where stu_number=#{stuNumber} and course_id=#{courseId}")
    AstuStudentScore selectByStuNumberAndcourseId(String stuNumber, String courseId);

    /**
     * 通过学号和实验号查询学生分数信息
     * @param stuNumber
     * @param experimentSerialNumber
     * @return
     */
    AstuStudentScore selectInfoByStuNumAndExperimentNum(@Param("stuNumber") String stuNumber,@Param("experimentNumber") String experimentSerialNumber);
}
